<template>
  <el-pagination
    align="right"
    style="margin: 10px 0px"
    :current-page="current"
    :page-sizes="[10, 20, 30]"
    :page-size="10"
    layout="total, sizes, prev, pager, next, jumper"
    :total="parseInt(total)"
    @size-change="handleSizeChange"
    @current-change="handleCurrentChange"
  />
</template>

<script>
export default {
  name: 'TablePage',
  props: {
    'total': {
      type: String,
      default: '0'
    },
    'current': {
      type: Number,
      default: 0
    },
    'size': {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
    }
  },
  methods: {
    handleSizeChange(size) {
      this.size = size
      this.$emit('settingTablePage', this.current, this.size)
    }, handleCurrentChange(current) {
      this.current = current
      this.$emit('settingTablePage', this.current, this.size)
    }
  }
}
</script>

<style scoped>

</style>
